Computer systems utilize many different peripheral devices to increase the availability of functions that the computer system can perform. Examples of peripheral devices include terminals, visual display units, printers, scanners, magnetic tape units, and disk drives. Peripheral devices also include auxiliary storage units for storing large amounts of data that cannot be stored in the central processing unit of the computer. These peripheral devices may include hard disk drives and optical disk drives, such as CD-ROM drives.
Peripheral devices are connected to, and controlled by, the computer through a peripheral interface. The peripheral interface recognizes what types of peripheral devices are connected to the computer and facilitates the proper flow of information and commands to and from the peripheral devices. Because the electrical and mechanical requirements differ from one peripheral device to another, software interfaces are used to standardize the format of the data transferred to and from the peripheral devices.
The peripheral interface that is prevalent today is the Integrated Drive Electronics (IDE) interface, also called the AT bus Attachment (ATA) software interface. The IDE interface utilizes IDE controller circuitry located directly in each peripheral device. The IDE controller, which controls communication between the operating system of the computer and the peripheral devices, is operatively connected to the computer via an IDE socket built into the motherboard of the computer. Alternatively, a small IDE adapter card can be used to adapt the computer to accept an IDE interface drive. An IDE software driver comprising instructions for regulating communication between the operating system of the computer and the peripheral devices is included within the computer.
In operation, the IDE controller first must communicate with the computer on the IDE interface to receive instructions relating to the tasks required of the peripheral devices. This communication is accomplished in accordance with the ANSI specification, as is well known by those skilled in the art, which defines the protocol for the interface between the IDE controller and the computer.
New non-disk peripheral storage devices, primarily CD-ROM drives, are now being equipped with IDE controllers. This connection to a CD-ROM drive is managed by the AT Application Programming Interface (ATAPI). ATAPI, as is well known in the art, was first used on 80286-based computers and is a software interface that allows CD-ROM drives to exist on the IDE interface. The ATAPI interface effectively allows the CD-ROM to be viewed by the computer as a disk peripheral. Because ATAPI allows the CD-ROM to be treated as a disk peripheral, the IDE driver software within the computer can control the CD-ROM drive in the same manner as it controls disk peripherals using the IDE software interface.
A CD-ROM drive, as is well known, is an optical digital data storage device. A CD-ROM drive utilizes a shiny disk into which tiny pits are formed. An optical read head directs a beam of light at the surface of the disk from a laser diode through a series of lenses and mirrors. The disk is connected to a motor, which spins the disk. As the disk containing the pits spins past the read head, a portion of the light incident on the disk is reflected back toward the read head. The degree of reflectivity is dependent upon the presence or absence of pits passing through the light beam. The portion of the disk that is unmarked by a pit has a high reflectivity while the portion marked by a pit has a low reflectivity. These reflections are captured by a photodetector positioned adjacent the laser diode, which decodes the differing intensities of the reflections into digital data.
The optical read head is moveable along the entire radius of the disk so that data located at any point on the disk can be accessed. The CD-ROM disk contains a single spiral track beginning near the center of the disk and ending at its outer edge. The track is divided into many sectors. All sectors are identical in length, regardless of their location on the disk. Therefore, each sector includes an identical portion of disk space and an identical amount of memory. The location of each sector is stored in a special file on the disk, thereby making each sector independently accessible.
When a command is issued to a CD-ROM drive to read digital data stored within a sector, the optical read head within the CD-ROM drive must move from its current position to the radial position corresponding to the desired destination sector. The read head is mounted on a sled that is radially movable in each direction between the center and outer edge of the disk such that any location on the disk may be accessed.
A CD-ROM disk spins continuously but not at a constant speed. The CD-ROM disk spins with constant linear velocity such that the portion of the disk immediately adjacent the read head is always moving at the same speed. Therefore, the length of disk track that passes the read head remains constant (for a time increment) independent of the sector position on the disk. Thus, the CD-ROM disk spins at a speed dependent on the location of the sector in which the desired data is located. When the CD-ROM disk is spinning, the outer portion of the disk is moving faster than the inner portion. To achieve constant linear velocity for the track on the disk, the disk spin speed must be varied. This variation is dependent on the location of the sector from which data is to be read. For example, when a sector at the outer edge of the CD-ROM disk is to be read, the spin speed must be slower than the spin speed required when a sector near the center is to be read. The CD-ROM drive automatically adjusts the spin speed according to the location of the sector to be read.
Therefore, when a new sector on the CD-ROM drive is accessed, two events occur. First, the sled holding the read head is moved radially via actuators to the new location. This movement of the sled, being mechanical in nature, is limited by inertial and frictional forces. A certain amount of time is required for the sled to overcome the effects of inertia and friction so as to effect its movement. Further time is required to allow the optical head to settle after its movement. This is a slow process relative to the movements of the read/write head of a magnetic hard disk drive because the optical head of the CD-ROM drive is much more massive than the read/write head of a magnetic hard disk drive. Second, the CD-ROM disk spin speed must be adjusted depending on the location of the sector accessed. This adjustment is mechanical, and the inertia of a rapidly spinning disk must be overcome to increase or decrease the disk spin speed. The mechanical movements of the head movement and the mechanical variation of the disk spin speed place absolute minimums on the time required for a CD-ROM drive to access a sector. Only after the movement of the read head is completed and the spin speed of the disk has been adjusted can the read head begin to retrieve data from the CD-ROM disk.
When a command is issued to the CD-ROM to retrieve data, the command is termed a "read" request. A "read" request requires two operations from the CD-ROM drive. First, the read head is repositioned to the position of the sector from which data is to be retrieved, and the spin speed is adjusted accordingly. This first operation is termed a "seek", because the read head seeks the proper location of the sector containing the data to be read. Second, after the seek operation is completed, the read head emits a beam of light and receives corresponding reflections from the surface of the disk to retrieve the data stored thereon. This second operation is termed the "data transfer" operation, because the data encoded on the disk is retrieved by the CD-ROM photodetector and decoded by the CD-ROM electronics. Therefore, a "read" request consists of two parts: the "seek" and the "data transfer" operations.
Typical seek times for CD-ROM drives are approximately one second or more, but vary depending on the location of the destination sector to be read and the current location of the read head. CD-ROM drives therefore have very slow seek times compared to IDE magnetic hard disk drives.
Magnetic hard disk drives include a stack of several rigid aluminum disks, or platters, coated with magnetic material. Data is encoded on each of the disks by magnetizing areas of the disk surface. The read/write head of the magnetic hard disk drive consists of tiny electromagnets that are attached to pivoting arms and positioned very close to the surface of the disks. The arms pivot to move the heads back and forth over the surface of the disks in a generally radial path. Head actuators pivot the arms and thus controls the movement of the read/write heads. When data is read from a hard disk drive, the head is positioned above the appropriate magnetized area of the disk, and the magnetic field of the disk induces a current in the head. The current induced in the head can then be decoded into digital data. Similarly, when data is written onto a hard disk, a current is supplied to the head, which produces a magnetic field which magnetizes a small area of the disk near the head. This small magnetized area represents a digital bit.
Magnetic hard disks, like CD-ROM disks, are formatted into sectors. Typically, the sectors are arranged in slices, such that the sectors at the outer edge of the disk take up more space than the sectors near the center of the disk. However, the data stored within each sector is spaced such that each sector contains an identical amount of data.
The rigid platters of the hard disk drive are connected to a spindle. The spindle is connected to a motor, which spins the disks in unison. Magnetic hard disks spin together at a constant rate, unlike the CD-ROM disks, which spin at varying speeds. Although the sectors of the magnetic hard disk take up different amounts of space, the data stored within each sector is identical. This allows the hard disks to spin at a constant rate to retrieve equal amounts of data regardless of the location of the sector on the disk. Like the CD-ROM sectors, hard disk sectors can be independently accessed by moving the head generally radially to the desired sector location.
The read/write heads of a hard disk drive are much smaller than the optical read heads of a CD-ROM drive. The CD-ROM heads include mirrors and lenses for focusing and directing the light beam toward the optical disk. By contrast, the hard disk heads are merely tiny electromagnets. These lighter heads of the hard disk drive are capable of moving across the surface of the hard disk much faster than the relatively bulky optical read heads of a CD-ROM drive. Also, because the hard disks spin at a constant speed, the hard disk drive does not adjust its spin speed to effect the reading of information from the disk, as must the CD-ROM drive. Therefore, hard disk drives have much shorter seek times as compared to CD-ROM drives. Typical hard disk drives have seek times of around 15 milliseconds as compared to the lengthy seek times of CD-ROM drives which may be one second or more.
The IDE interface can accept a maximum of two peripheral devices at one time. However, these two devices cannot be serviced simultaneously, but only alternatively. When one of these devices is a CD-ROM drive, with its long seek time, and the other is a magnetic hard disk drive, with its short seek time, a serious problem may arise in terms of continued access to the hard disk drive. When the CD-ROM optical read head is seeking, which can take up to one second, the hard disk drive cannot be accessed and many potential operations of the magnetic hard disk drive are lost. Therefore, it is desirable to provide overlapping service of the CD-ROM drive and the hard disk drive so that any pending requests from the computer to the faster hard disk drive will be executed while the slower CD-ROM drive is seeking.
The IDE, or ATA, software interface used between the operating system of the computer and the peripheral devices provides only a limited overlapping operation. This prior art operation allows issuance of a seek command to a first slower peripheral device which interrupts the computer to acknowledge that the seek of the first peripheral device has begun. Once the seek interrupt has been received by the computer, the computer initiates a request to the second faster peripheral device, which results in minimal overlapping service and some marginal performance improvement.
The interrupt does not, however, indicate whether or not the slower peripheral device has completed its seek operation. Typical implementations try to circumvent this problem by checking to see if there is a request for the faster second peripheral device (hard disk drive) before initiating a seek for the slower first peripheral device (CD-ROM drive). If a request for the second faster peripheral device exists, the seek operation of the first slower device is initiated, and the request for the second faster device is issued while the first slower peripheral device seeks. When the execution of the request to the second, faster device is completed, the second device sends an interrupt to the computer. Upon receipt of the interrupt, the computer continues the execution of the original request for the first slower device regardless of the status of the seek and prepares to commence the data transfer.
Unfortunately, if the computer has only a request outstanding for the first slower device but not for the second faster device, an entire read command (both seek and data transfer operations) must be issued for the first slower device. The computer cannot issue merely a seek for the first device because no seek completion status interrupt will be received, and thus the computer will not know when the seek is completed and the data transfer should begin. This could potentially result in the first slower peripheral device sitting indefinitely idle after it has completed seeking in the absence of a request to the second peripheral device. Therefore, in this case, the entire read request to the first device is issued and must be completed before service of the second peripheral is permitted.
The current operation for overlapping service of peripheral devices described in the preceding section is more fully shown in FIG. 1. FIG. 1 demonstrates the limitations of the existing method of overlapping service of peripheral devices. As shown in FIG. 1, the method begins at step 110, which determines whether there is a read request for a first slower peripheral device, such as a CD-ROM drive. If there is no read request for the CD-ROM drive, the method follows the "no" branch 112 and waits until such a read request for the CD-ROM drive arrives.
When a read request for the CD-ROM drive is present at step 110, the method follows the "yes" branch 114 to step 120. At step 120, the method determines whether or not there is a pending request for a second faster peripheral device such as a magnetic hard disk drive. If a request for the hard disk drive is pending at step 120, the prior art method follows the "yes" branch 122 to step 140 where the method proceeds to initiate a seek operation for the CD-ROM drive. If, however, there is no pending request for the hard disk drive at step 120, the method follows "no" branch 124 to step 130 where the CD-ROM is instructed to execute a complete read request including both a lengthy seek operation and a data transfer operation.
Returning to step 140, the CD-ROM drive initiates a seek operation only because there is a pending request for the hard disk drive (step 120, "yes" branch 122). After the CD-ROM drive has begun its seek operation, the CD-ROM drive sends an interrupt to the computer indicating that the CD-ROM drive has initiated its seek operation. Once the interrupt has been received by the computer at step 150, the computer initiates the execution of the pending request to the hard disk drive at step 160. The software then waits in the "no" branch 174 of step 170 until the hard disk drive has completed its request. After the hard disk drive request is completed as indicated by the "yes" branch 172 at step 170, the data transfer is executed by the CD-ROM drive at step 180.
As previously noted, if a pending request to the hard disk drive is not present at step 120 after a read request has been issued to the CD-ROM drive at step 110, the prior art method immediately initiates the entire read request (seek and data transfer) to the CD-ROM drive at step 130. This demonstrates the inability of the prior art overlapping method to efficiently utilize the time (as much as one second) during which the CD-ROM drive is seeking to execute requests to the hard disk drive. Therefore, when a hard disk drive request is issued shortly after the read request for the CD-ROM drive is issued, the hard disk drive request is not serviced until the CD-ROM read request (seek and data transfer) is completed at step 130.
Even when a hard disk request is pending at step 120, the time, during which the CD-ROM drive is seeking, is used to service only one hard disk request (step 160). This likewise results in inefficient use of the time during which the CD-ROM drive is seeking. The presence of a pending request to the hard disk drive is the sole parameter that allows only minimal overlapping service of a single request to the hard disk drive. When this hard disk drive request is absent, no overlapping service of requests to the hard disk drive can be performed until the read request to the CD-ROM drive is completed. The above described prior art method yields unacceptable results when the first peripheral device has a substantially longer seek time than the second peripheral device, as occurs when the first device is a CD-ROM drive and the second device is a hard disk drive.